

<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
  <meta charset="utf-8" />
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  
  <title>升级 Ceph &mdash; Ceph Documentation</title>
  

  
  <link rel="stylesheet" href="../../../_static/ceph.css" type="text/css" />
  <link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
  <link rel="stylesheet" href="../../../_static/graphviz.css" type="text/css" />
  <link rel="stylesheet" href="../../../_static/css/custom.css" type="text/css" />

  
  
    <link rel="shortcut icon" href="../../../_static/favicon.ico"/>
  

  
  

  

  
  <!--[if lt IE 9]>
    <script src="../../../_static/js/html5shiv.min.js"></script>
  <![endif]-->
  
    
      <script type="text/javascript" id="documentation_options" data-url_root="../../../" src="../../../_static/documentation_options.js"></script>
        <script src="../../../_static/jquery.js"></script>
        <script src="../../../_static/underscore.js"></script>
        <script src="../../../_static/doctools.js"></script>
    
    <script type="text/javascript" src="../../../_static/js/theme.js"></script>

    
    <link rel="index" title="Index" href="../../../genindex/" />
    <link rel="search" title="Search" href="../../../search/" />
    <link rel="next" title="安装 Ceph 对象网关" href="../install-ceph-gateway/" />
    <link rel="prev" title="Ceph 对象网关快速入门" href="../quick-rgw/" /> 
</head>

<body class="wy-body-for-nav">

   
  <header class="top-bar">
    

















<div role="navigation" aria-label="breadcrumbs navigation">

  <ul class="wy-breadcrumbs">
    
      <li><a href="../../../" class="icon icon-home"></a> &raquo;</li>
        
          <li><a href="../../">安装 Ceph</a> &raquo;</li>
        
          <li><a href="../">安装 (ceph-deploy)</a> &raquo;</li>
        
      <li>升级 Ceph</li>
    
    
      <li class="wy-breadcrumbs-aside">
        
          
            <a href="../../../_sources/install/ceph-deploy/upgrading-ceph.rst.txt" rel="nofollow"> View page source</a>
          
        
      </li>
    
  </ul>

  
  <hr/>
</div>
  </header>
  <div class="wy-grid-for-nav">
    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search"  style="background: #eee" >
          

          
            <a href="../../../">
          

          
            
            <img src="../../../_static/logo.png" class="logo" alt="Logo"/>
          
          </a>

          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="../../../search/" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        
        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
              
            
            
              <ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../../start/intro/">Ceph 简介</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../../">安装 Ceph</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../../#id1">建议的方法</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../../#id2">其他方法</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="../../index_manual/">安装（手动）</a></li>
<li class="toctree-l3 current"><a class="reference internal" href="../">安装 (ceph-deploy)</a><ul class="current">
<li class="toctree-l4"><a class="reference internal" href="../quick-start-preflight/">Preflight</a></li>
<li class="toctree-l4"><a class="reference internal" href="../quick-ceph-deploy/">Storage Cluster Quick Start</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../start/quick-rbd/">Block Device Quick Start</a></li>
<li class="toctree-l4"><a class="reference internal" href="../quick-cephfs/">Filesystem Quick Start</a></li>
<li class="toctree-l4"><a class="reference internal" href="../quick-rgw/">Object Storage Quick Start</a></li>
<li class="toctree-l4 current"><a class="current reference internal" href="#">升级 Ceph</a></li>
<li class="toctree-l4"><a class="reference internal" href="../install-ceph-gateway/">    安装 Ceph 对象网关</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../cephadm/">Cephadm</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../rados/">Ceph 存储集群</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../cephfs/">Ceph 文件系统</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../rbd/">Ceph 块设备</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../radosgw/">Ceph 对象网关</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../mgr/">Ceph 管理器守护进程</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../mgr/dashboard/">Ceph 仪表盘</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../api/">API 文档</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../architecture/">体系结构</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../dev/developer_guide/">开发者指南</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../dev/internals/">Ceph 内幕</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../governance/">项目管理</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../foundation/">Ceph 基金会</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../ceph-volume/">ceph-volume</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../releases/general/">Ceph 版本（总目录）</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../releases/">Ceph 版本（索引）</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../glossary/">Ceph 术语</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../translation_cn/">中文版翻译资源</a></li>
</ul>

            
          
        </div>
        
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="../../../">Ceph</a>
        
      </nav>


      <div class="wy-nav-content">
        
        <div class="rst-content">
        
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
<div id="dev-warning" class="admonition note">
  <p class="first admonition-title">Notice</p>
  <p class="last">This document is for a development version of Ceph.</p>
</div>
  <div id="docubetter" align="right" style="padding: 5px; font-weight: bold;">
    <a href="https://pad.ceph.com/p/Report_Documentation_Bugs">Report a Documentation Bug</a>
  </div>

  
  <div class="section" id="ceph">
<h1>升级 Ceph<a class="headerlink" href="#ceph" title="Permalink to this headline">¶</a></h1>
<p>Ceph 的各个版本都可能有特定的步骤，升级前请参考与此版本相关的章节和<a class="reference external" href="../../../releases">此版本的发布摘要</a>文档，以确定有哪些特定于此版本的步骤。</p>
<div class="section" id="id1">
<h2>概述<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h2>
<p>你可以在 Ceph 集群在线且提供服务时升级守护进程！某些类型的守护进程依赖其他的，如 Ceph 元数据服务器和 Ceph 对象网关依赖于
Ceph 监视器和 OSD 守护进程，所以我们建议按以下顺序升级：</p>
<ol class="arabic simple">
<li><p><a class="reference internal" href="#ceph-deploy">ceph-deploy 工具</a></p></li>
<li><p>Ceph 监视器</p></li>
<li><p>Ceph OSD 守护进程</p></li>
<li><p>Ceph 元数据服务器</p></li>
<li><p>Ceph 对象网关</p></li>
</ol>
<p>作为普适规则，我们建议一次升级一类的所有守护进程（如所有
<code class="docutils literal notranslate"><span class="pre">ceph-osd</span></code> 、所有 <code class="docutils literal notranslate"><span class="pre">ceph-mon</span></code> 等），这样才能确保它们属于同一版本。还有，我们建议升级完集群内的所有守护进程之后，再拿此版本的新功能练手。</p>
<p><a class="reference internal" href="#id2">升级过程</a>相对简单，但升级前务必看一下<a class="reference external" href="../../../releases">此版本的发布摘要</a>。基本过程有三个：</p>
<ol class="arabic">
<li><p>在你的管理节点上用 <code class="docutils literal notranslate"><span class="pre">ceph-deploy</span></code> 为各主机升级软件包（用
<code class="docutils literal notranslate"><span class="pre">ceph-deploy</span> <span class="pre">install</span></code> 命令），或者分别登录各主机<a class="reference external" href="../../install-storage-cluster/">用你发行版自带的包管理器</a>升级 Ceph 软件包。例如，<a class="reference internal" href="#id3">升级监视器</a>时， <code class="docutils literal notranslate"><span class="pre">ceph-deploy</span></code> 语法大致如此：</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">ceph</span><span class="o">-</span><span class="n">deploy</span> <span class="n">install</span> <span class="o">--</span><span class="n">release</span> <span class="p">{</span><span class="n">release</span><span class="o">-</span><span class="n">name</span><span class="p">}</span> <span class="n">ceph</span><span class="o">-</span><span class="n">node1</span><span class="p">[</span> <span class="n">ceph</span><span class="o">-</span><span class="n">node2</span><span class="p">]</span>
<span class="n">ceph</span><span class="o">-</span><span class="n">deploy</span> <span class="n">install</span> <span class="o">--</span><span class="n">release</span> <span class="n">firefly</span> <span class="n">mon1</span> <span class="n">mon2</span> <span class="n">mon3</span>
</pre></div>
</div>
<p><strong>注：</strong> <code class="docutils literal notranslate"><span class="pre">ceph-deploy</span> <span class="pre">install</span></code> 命令会把指定节点上的旧版本升级为你所指定的版本，没有 <code class="docutils literal notranslate"><span class="pre">ceph-deploy</span> <span class="pre">upgrade</span></code> 这样的升级命令。</p>
</li>
<li><p>登录各节点并重启各相关 Ceph 守护进程，详情参见<a class="reference external" href="../../../rados/operations/operating">操纵集群</a> 。</p></li>
<li><p>确认集群健康状况，详情见<a class="reference external" href="../../../rados/operations/monitoring">监控集群</a>。</p></li>
</ol>
<div class="admonition important">
<p class="admonition-title">Important</p>
<p>一旦升级完，就不能降级了。</p>
</div>
</div>
<div class="section" id="ceph-deploy">
<h2>ceph-deploy 工具<a class="headerlink" href="#ceph-deploy" title="Permalink to this headline">¶</a></h2>
<p>升级 Ceph 守护进程前，应该先升级 <code class="docutils literal notranslate"><span class="pre">ceph-deploy</span></code> 工具。</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">pip</span> <span class="n">install</span> <span class="o">-</span><span class="n">U</span> <span class="n">ceph</span><span class="o">-</span><span class="n">deploy</span>
</pre></div>
</div>
<p>或者：</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">install</span> <span class="n">ceph</span><span class="o">-</span><span class="n">deploy</span>
</pre></div>
</div>
<p>或者：</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">yum</span> <span class="n">install</span> <span class="n">ceph</span><span class="o">-</span><span class="n">deploy</span> <span class="n">python</span><span class="o">-</span><span class="n">pushy</span>
</pre></div>
</div>
</div>
<div class="section" id="id2">
<h2>升级过程<a class="headerlink" href="#id2" title="Permalink to this headline">¶</a></h2>
<p>下面是具体升级进程。</p>
<div class="admonition important">
<p class="admonition-title">Important</p>
<p>Ceph 的各版本可能有不同的步骤，所以<strong>升级前</strong>请参考此版本特定的升级步骤。</p>
</div>
<div class="section" id="id3">
<h3>升级监视器<a class="headerlink" href="#id3" title="Permalink to this headline">¶</a></h3>
<p>要升级监视器，执行下列步骤：</p>
<ol class="arabic">
<li><p>升级各守护进程的二进制包。</p>
<p>你可以用 <code class="docutils literal notranslate"><span class="pre">ceph-deploy</span></code> 一次升级所有监视器节点，如：</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">ceph</span><span class="o">-</span><span class="n">deploy</span> <span class="n">install</span> <span class="o">--</span><span class="n">release</span> <span class="p">{</span><span class="n">release</span><span class="o">-</span><span class="n">name</span><span class="p">}</span> <span class="n">ceph</span><span class="o">-</span><span class="n">node1</span><span class="p">[</span> <span class="n">ceph</span><span class="o">-</span><span class="n">node2</span><span class="p">]</span>
<span class="n">ceph</span><span class="o">-</span><span class="n">deploy</span> <span class="n">install</span> <span class="o">--</span><span class="n">release</span> <span class="n">hammer</span> <span class="n">mon1</span> <span class="n">mon2</span> <span class="n">mon3</span>
</pre></div>
</div>
<p>你也可以用包管理器挨个升级各节点。手动升级 Debian/Ubuntu
主机上软件包的步骤如下：</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">ssh</span> <span class="p">{</span><span class="n">mon</span><span class="o">-</span><span class="n">host</span><span class="p">}</span>
<span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">update</span> <span class="o">&amp;&amp;</span> <span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">install</span> <span class="n">ceph</span>
</pre></div>
</div>
<p>在 CentOS/Red Hat 主机上相应的命令如下：</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">ssh</span> <span class="p">{</span><span class="n">mon</span><span class="o">-</span><span class="n">host</span><span class="p">}</span>
<span class="n">sudo</span> <span class="n">yum</span> <span class="n">update</span> <span class="o">&amp;&amp;</span> <span class="n">sudo</span> <span class="n">yum</span> <span class="n">install</span> <span class="n">ceph</span>
</pre></div>
</div>
</li>
<li><p>重启各监视器。 Debian/Ubuntu 发行版的命令如下：</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">restart</span> <span class="n">ceph</span><span class="o">-</span><span class="n">mon</span> <span class="nb">id</span><span class="o">=</span><span class="p">{</span><span class="n">hostname</span><span class="p">}</span>
</pre></div>
</div>
<p>CentOS/Red Hat/Debian 发行版的命令如下：</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">init</span><span class="o">.</span><span class="n">d</span><span class="o">/</span><span class="n">ceph</span> <span class="n">restart</span> <span class="p">{</span><span class="n">mon</span><span class="o">-</span><span class="nb">id</span><span class="p">}</span>
</pre></div>
</div>
<p>用 <code class="docutils literal notranslate"><span class="pre">ceph-deploy</span></code> 部署的 CentOS/Red Hat 发行版，其监视器 ID
通常是 <code class="docutils literal notranslate"><span class="pre">mon.{hostname}</span></code> 。</p>
</li>
<li><p>确保各监视器都重回法定人数。</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">ceph</span> <span class="n">mon</span> <span class="n">stat</span>
</pre></div>
</div>
</li>
</ol>
<p>再次确认你完成了所有监视器的升级。</p>
</div>
<div class="section" id="osd">
<h3>升级单个 OSD<a class="headerlink" href="#osd" title="Permalink to this headline">¶</a></h3>
<p>升级单个 OSD 守护进程的步骤如下：</p>
<ol class="arabic">
<li><p>升级 OSD 守护进程对应的软件包。</p>
<p>你可以用 <code class="docutils literal notranslate"><span class="pre">ceph-deploy</span></code> 一次升级所有 OSD 守护进程，如：</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">ceph</span><span class="o">-</span><span class="n">deploy</span> <span class="n">install</span> <span class="o">--</span><span class="n">release</span> <span class="p">{</span><span class="n">release</span><span class="o">-</span><span class="n">name</span><span class="p">}</span> <span class="n">ceph</span><span class="o">-</span><span class="n">node1</span><span class="p">[</span> <span class="n">ceph</span><span class="o">-</span><span class="n">node2</span><span class="p">]</span>
<span class="n">ceph</span><span class="o">-</span><span class="n">deploy</span> <span class="n">install</span> <span class="o">--</span><span class="n">release</span> <span class="n">hammer</span> <span class="n">osd1</span> <span class="n">osd2</span> <span class="n">osd3</span>
</pre></div>
</div>
<p>你也可以<a class="reference external" href="../../install-storage-cluster/">用你发行版自带的包管理器</a> 挨个升级各节点的软件包。手动升级 Debian/Ubuntu 主机上软件包的步骤如下。</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">ssh</span> <span class="p">{</span><span class="n">osd</span><span class="o">-</span><span class="n">host</span><span class="p">}</span>
<span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">update</span> <span class="o">&amp;&amp;</span> <span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">install</span> <span class="n">ceph</span>
</pre></div>
</div>
<p>在 CentOS/Red Hat 主机上相应的命令如下：</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">ssh</span> <span class="p">{</span><span class="n">osd</span><span class="o">-</span><span class="n">host</span><span class="p">}</span>
<span class="n">sudo</span> <span class="n">yum</span> <span class="n">update</span> <span class="o">&amp;&amp;</span> <span class="n">sudo</span> <span class="n">yum</span> <span class="n">install</span> <span class="n">ceph</span>
</pre></div>
</div>
</li>
<li><p>重启 OSD ，其中 <code class="docutils literal notranslate"><span class="pre">N</span></code> 是 OSD 号。对 Debian/Ubuntu ，用命令：</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">restart</span> <span class="n">ceph</span><span class="o">-</span><span class="n">osd</span> <span class="nb">id</span><span class="o">=</span><span class="n">N</span>
</pre></div>
</div>
<p>对于一主机上的多个 OSD ，你可以用 Upstart 一次性全部重启。</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">restart</span> <span class="n">ceph</span><span class="o">-</span><span class="n">osd</span><span class="o">-</span><span class="nb">all</span>
</pre></div>
</div>
<p>对于CentOS/Red Hat/Debian 发行版，用：</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">init</span><span class="o">.</span><span class="n">d</span><span class="o">/</span><span class="n">ceph</span> <span class="n">restart</span> <span class="n">N</span>
</pre></div>
</div>
</li>
<li><p>确保升级后的 OSD 重新加入了集群：</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">ceph</span> <span class="n">osd</span> <span class="n">stat</span>
</pre></div>
</div>
</li>
</ol>
<p>再次确认所有 OSD 守护进程已升级完。</p>
</div>
<div class="section" id="id4">
<h3>升级单个元数据服务器<a class="headerlink" href="#id4" title="Permalink to this headline">¶</a></h3>
<p>要升级单个 Ceph 元数据服务器，挨个执行下列步骤：</p>
<ol class="arabic">
<li><p>升级二进制包。你可以用 <code class="docutils literal notranslate"><span class="pre">ceph-deploy</span></code> 一次升级所有
MDS 节点，也可以在各节点用包管理器升级，如：</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">ceph</span><span class="o">-</span><span class="n">deploy</span> <span class="n">install</span> <span class="o">--</span><span class="n">release</span> <span class="p">{</span><span class="n">release</span><span class="o">-</span><span class="n">name</span><span class="p">}</span> <span class="n">ceph</span><span class="o">-</span><span class="n">node1</span>
<span class="n">ceph</span><span class="o">-</span><span class="n">deploy</span> <span class="n">install</span> <span class="o">--</span><span class="n">release</span> <span class="n">hammer</span> <span class="n">mds1</span>
</pre></div>
</div>
<p>在 Debian/Ubuntu 主机上可这样手动升级。</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">ssh</span> <span class="p">{</span><span class="n">mon</span><span class="o">-</span><span class="n">host</span><span class="p">}</span>
<span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">update</span> <span class="o">&amp;&amp;</span> <span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">install</span> <span class="n">ceph</span><span class="o">-</span><span class="n">mds</span>
</pre></div>
</div>
<p>在 CentOS/Red Hat 主机上则是：</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">ssh</span> <span class="p">{</span><span class="n">mon</span><span class="o">-</span><span class="n">host</span><span class="p">}</span>
<span class="n">sudo</span> <span class="n">yum</span> <span class="n">update</span> <span class="o">&amp;&amp;</span> <span class="n">sudo</span> <span class="n">yum</span> <span class="n">install</span> <span class="n">ceph</span><span class="o">-</span><span class="n">mds</span>
</pre></div>
</div>
</li>
<li><p>重启元数据服务器。在 Debian/Ubuntu 上用：</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">restart</span> <span class="n">ceph</span><span class="o">-</span><span class="n">mds</span> <span class="nb">id</span><span class="o">=</span><span class="p">{</span><span class="n">hostname</span><span class="p">}</span>
</pre></div>
</div>
<p>在 CentOS/Red Hat/Debian 上用：</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">init</span><span class="o">.</span><span class="n">d</span><span class="o">/</span><span class="n">ceph</span> <span class="n">restart</span> <span class="n">mds</span><span class="o">.</span><span class="p">{</span><span class="n">hostname</span><span class="p">}</span>
</pre></div>
</div>
<p>用 <code class="docutils literal notranslate"><span class="pre">ceph-deploy</span></code> 部署的集群其 <code class="docutils literal notranslate"><span class="pre">{hostname}</span></code> 通常是所在主机的主机名。</p>
</li>
<li><p>确保元数据服务器已启动，且运行着：</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">ceph</span> <span class="n">mds</span> <span class="n">stat</span>
</pre></div>
</div>
</li>
</ol>
</div>
<div class="section" id="id5">
<h3>升级客户端<a class="headerlink" href="#id5" title="Permalink to this headline">¶</a></h3>
<p>升级软件包并重启完集群之后，我们建议同时升级下客户端节点上的
<code class="docutils literal notranslate"><span class="pre">ceph-common</span></code> 和客户端库（ <code class="docutils literal notranslate"><span class="pre">librbd1</span></code> 和 <code class="docutils literal notranslate"><span class="pre">librados2</span></code> ）。</p>
<ol class="arabic">
<li><p>升级软件包：</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">ssh</span> <span class="p">{</span><span class="n">client</span><span class="o">-</span><span class="n">host</span><span class="p">}</span>
<span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">update</span> <span class="o">&amp;&amp;</span> <span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">install</span> <span class="n">ceph</span><span class="o">-</span><span class="n">common</span> <span class="n">librados2</span> <span class="n">librbd1</span> <span class="n">python</span><span class="o">-</span><span class="n">rados</span> <span class="n">python</span><span class="o">-</span><span class="n">rbd</span>
</pre></div>
</div>
</li>
<li><p>确认升级后的版本：</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">ceph</span> <span class="o">--</span><span class="n">version</span>
</pre></div>
</div>
</li>
</ol>
<p>如果不是最新版，你也许得卸载、清理掉依赖、然后重新安装。</p>
</div>
</div>
</div>



           </div>
           
          </div>
          <footer>
    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
        <a href="../install-ceph-gateway/" class="btn btn-neutral float-right" title="安装 Ceph 对象网关" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
        <a href="../quick-rgw/" class="btn btn-neutral float-left" title="Ceph 对象网关快速入门" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
    </div>

  <hr/>

  <div role="contentinfo">
    <p>
        &#169; Copyright 2016, Ceph authors and contributors. Licensed under Creative Commons Attribution Share Alike 3.0 (CC-BY-SA-3.0).

    </p>
  </div> 

</footer>
        </div>
      </div>

    </section>

  </div>
  

  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script>

  
  
    
   

</body>
</html>